﻿using CID.Web.Controllers;
using NailsFramework.UserInterface.TestingSupport;
using NUnit.Framework;

namespace CID.Web.Tests.Controllers
{
    [TestFixture]
    class HomeControllerTests : BaseWebTests
    {
        HomeController controller;
        
        public override void SetUp()
        {
            base.SetUp();
            controller = TestControllers.Get<HomeController>();
        }

        [Test]
        public void TestIndex_ShouldGoToDefaultView()
        {
            var result = controller.Index();

            Assert.IsNotNull(result);
            Assert.IsNull(result.Model);
            Assert.AreEqual("", result.ViewName);
        }

        [Test]
        public void TestDevelopment_ShouldGoToDefaultView()
        {
            var result = controller.Development();

            Assert.IsNotNull(result);
            Assert.IsNull(result.Model);
            Assert.AreEqual("", result.ViewName);
        }

        [Test]
        public void TestOperations_ShouldGoToDefaultView()
        {
            var result = controller.Operations();

            Assert.IsNotNull(result);
            Assert.IsNull(result.Model);
            Assert.AreEqual("", result.ViewName);
        }

        [Test]
        public void TestInfrastructure_ShouldGoToDefaultView()
        {
            var result = controller.Infrastructure();

            Assert.IsNotNull(result);
            Assert.IsNull(result.Model);
            Assert.AreEqual("", result.ViewName);
        }

        [Test]
        public void TestAudit_ShouldGoToDefaultView()
        {
            var result = controller.Audit();

            Assert.IsNotNull(result);
            Assert.IsNull(result.Model);
            Assert.AreEqual("", result.ViewName);
        }
    }
}
